<?php namespace app\common\validate;


use think\Validate;

/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/3/14
 * Time: 15:13
 */
class LitestoreOrderAddress extends Validate {
    protected $rule = [
        'name'  => 'require',
        'phone'  => 'require',
        'address'  => 'require',
//        'detail'  => 'require',

    ];
    protected $message = [
        'name.require' => '联系人不能为空',
        'phone.require' => '手机号不能为空',
        'address.require' => '收货地址不能为空',
//        'detail.require' => '门牌号不能为空',

    ];
    // 自定义验证规则
    protected function checkName($value,$rule,$data)
    {
        return $rule == $value ? true : '名称错误';
    }
}